﻿<u:UObject x:Class="UTable.Objects.UWorkspace"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:u="clr-namespace:UTable.Objects.Controls;assembly=UTable.Core"
    xmlns:uc="clr-namespace:UTable.Objects.Controls"
    xmlns:uu="clr-namespace:UTable.Objects"
    Height="500" Width="780" CanHoldObjects="True" Background="Transparent" BorderThickness="0" ActivationEffectType="Move" Pinned="True" MenuPosition="10, 440" MenuOrientation="55">
    <u:UObject.Resources>
        <DataTemplate x:Key="MessageListTempalate">
            <Grid Height="48">
                <TextBlock Text="{Binding Path=Text}" Foreground="{Binding Path=Color}" Grid.Column="0" VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
    </u:UObject.Resources>
    <Border CornerRadius="10" x:Name="SpaceBorder">
        <Border.Background>
            <ImageBrush ImageSource="Images/workspace.png"/>
        </Border.Background>
        <Grid>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="220" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="150" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border Grid.Column="1" Grid.RowSpan="2" Margin="10,14,19,15" CornerRadius="20">
                    <Border.Background>
                        <ImageBrush ImageSource="Images/read_region.png" TileMode="Tile" Viewport="0, 0, 63, 25" ViewportUnits="Absolute"/>
                    </Border.Background>
                    <Grid  Margin="10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="60" />
                            <RowDefinition Height="306*" />
                        </Grid.RowDefinitions>
                        <StackPanel x:Name="ReadToolbar" Orientation="Horizontal">
                            <u:UToggleButton Width="80" Margin="0, 0, 5, 0" x:Name="NoteButton" Checked="NoteButton_Checked" Unchecked="NoteButton_Unchecked">
                                <Image Source="Images/brush.png"/>
                            </u:UToggleButton>
                            <u:UToggleButton Width="80" Margin="0, 0, 5, 0" x:Name="ClearButton" Checked="ClearButton_Checked" Unchecked="ClearButton_Unchecked" >
                                <Image Source="Images/eraser.png"/>
                            </u:UToggleButton>
                            <u:UButton Width="80" Margin="0, 0, 5, 0" x:Name="PhotoBrowseButton" Pressed="PhotoBrowseButton_Pressed">
                                <Grid>
                                    <Image Source="Images/photoBrowseGrid.jpg" Margin="0, 10, 5, 8" x:Name="AlbumGridImage"/>
                                    <Image Source="Images/photoBrowseScan.jpg" Margin="3, 10, 8, 8" x:Name="AlbumScanImage" Visibility="Collapsed"/>
                                </Grid>
                            </u:UButton>
                            <u:UButton Width="80" Margin="0, 0, 5, 0" x:Name="CloseButton" Pressed="CloseButton_Pressed">
                                <Image Source="Images/book3.png"/>
                            </u:UButton>
                            <u:UButton Width="80" Margin="0, 0, 5, 0" x:Name="ShareButton" Pressed="ShareButton_Pressed">
                                <Image Source="Images/sharing.png" Margin="0, 0, 0, 10"/>
                            </u:UButton>
                        </StackPanel>
                        <TextBlock x:Name="NumberText"  Text="{Binding Number}" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" FontSize="28" FontWeight="Bold"  Margin="0, 0, 5, 0"/>
                        <u:UButton Width="90" HorizontalAlignment="Right" Margin="0, 10, 75, 10" FontSize="17" x:Name="BindUserButton" Pressed="BindUserButton_Pressed">Bind User</u:UButton>
                        <TextBlock Width="90" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0, -18, 82, 10" FontSize="22" x:Name="BindUserText" Text="" Visibility="Collapsed"/>
                        <u:UButton Width="105" Height="20"  HorizontalAlignment="Right" Margin="0, 20, 75, 0" FontSize="16" x:Name="UnbindUserButton" Pressed="UnbindUserButton_Pressed" Visibility="Collapsed">Unbind User</u:UButton>
                        <u:UGrid x:Name="ReadRegionBorder" Grid.Row="1" Margin="-10, 0, -10, -10" Background="#01000000">
                            <Grid x:Name="ReadRegion" Margin="12, 0, 12, 12">
                            </Grid>
                        </u:UGrid>
                    </Grid>
                </Border>
                <Border Grid.Row="0" Grid.Column="0" Margin="15, 10, -5, -5">
                    <Border.Background>
                        <ImageBrush ImageSource="Images/messagebox.png" />
                    </Border.Background>
                    <Grid>
                        <u:UListBox Margin="2, 23, 5, 5" x:Name="MessageList">
                        </u:UListBox>
                        <TextBlock Text="Message Box" FontSize="16" VerticalAlignment="Top"  Foreground="Blue" FontFamily="Calibri" FontStyle="Italic"  Margin="15, 10, 0, 0"></TextBlock>
                    </Grid>
                </Border>
            </Grid>
            <uc:UDrawer DrawerName="Document Case" Width="420" Height="280" VerticalAlignment="Bottom" HorizontalAlignment="Left" x:Name="Drawer" OpenDirection="Right" Margin="15, 15, 15, 60">
                <uc:UGridView x:Name="DrawerGrid" LayoutDirection="TopDownLeft"  LayoutMargin="10, 5, 10, 5" CellMargin="15">
                </uc:UGridView>
            </uc:UDrawer>
            <Canvas x:Name="Stage" Grid.ColumnSpan="2"/>
        </Grid>
    </Border>
</u:UObject>
